package org.example.controller;

import org.example.model.common.dtos.ResponseResult;
import org.example.model.money.MoneyTotal;
import org.example.service.MoneyTotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/money-total")
public class MoneyTotalController {

    @Autowired
    private MoneyTotalService moneyTotalService;

    @GetMapping("/money-total")
    public ResponseResult GetAll() {
        return ResponseResult.okResult(moneyTotalService.GetAll());
    }
}
